<template>
    <div class="row">
        <div class="col-xs-12 title">
            <div class="div-back" v-if="needBack">&lt;返回
            </div>
                {{title}}
            </div>
    </div>
</template>

<script lang="ts">
    import {Vue,Prop,Component}from "vue-property-decorator"
    @Component
    export default class TitleBar extends Vue{
        //定义标题
        @Prop()title!: string;
        @Prop()needBack: boolean | undefined;

    }
</script>

<style scoped>
.div-back{
    position: absolute;
}
</style>